$(function() {
    $('form input.connexion-identifiant, form input.connexion-password').defaultValue();

    $('div.theme, div.discussion')
    .css('cursor', 'pointer')
    .bind('click', function() {
        window.location = $(this).find('h2 a').attr('href');
    });


    $('#menu-items a').hover(function() {
        $('#menu-items a').not($(this)).stop().animate({
	   'opacity': 0.4
        }, 700, 'easeOutSine')
    },function() {
        $('#menu-items a').not($(this)).stop().animate({
	   'opacity': 1
        }, 500, 'easeOutExpo')
    });


    $('textarea.tinymce').tinymce({
        // Location of TinyMCE script
        script_url : '/domainedesscribes/web/js/tiny_mce/tiny_mce.js',

        // General options
        language : "fr",
        theme : "advanced",
        skin : "o2k7",
        plugins : "pagebreak,style,advhr,advimage,advlink,emotions,iespell,inlinepopups,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",

        // Theme options
        theme_advanced_buttons1 : "fullscreen,|,undo,redo,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,link,unlink,anchor,cleanup,|,code,styleprops",
        theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor,|,sub,sup,charmap",
        theme_advanced_buttons3 : "outdent,indent,|,formatselect,styleselect,fontsizeselect,|,blockquote,cite,abbr,acronym",
        theme_advanced_buttons4 : "attribs,|,emotions,image,media,|,hr,nonbreaking,pagebreak",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,

        // Example content CSS (should be your site CSS)
        content_css : "/domainedesscribes/style,form.php.css",

         // Style formats
        style_formats : [
               /* {title : 'Bold text', inline : 'b'},
                {title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
                {title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
                {title : 'Example 1', inline : 'span', classes : 'example1'},
                {title : 'Example 2', inline : 'span', classes : 'example2'},
                {title : 'Table styles'},
                {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}*/
        ],

        formats : {
                /*alignleft : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'left'},
                aligncenter : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'center'},
                alignright : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'right'},
                alignfull : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'full'},
                bold : {inline : 'span', 'classes' : 'bold'},
                italic : {inline : 'span', 'classes' : 'italic'},
                underline : {inline : 'span', 'classes' : 'underline', exact : true},
                strikethrough : {inline : 'del'},
                customformat : {inline : 'span', styles : {color : '#00ff00', fontSize : '20px'}, attributes : {title : 'My custom format'}}*/
        },

        // Drop lists for link/image/media/template dialogs
        template_external_list_url : "/domainedesscribes/web/js/tiny_mce/plugins/lists/template_list.js",
        external_link_list_url : "/domainedesscribes/web/js/tiny_mce/plugins/lists/link_list.js",
        external_image_list_url : "/domainedesscribes/web/js/tiny_mce/plugins/lists/image_list.js",
        media_external_list_url : "/domainedesscribes/web/js/tiny_mce/plugins/lists/media_list.js",

        // Replace values for the template plugin
        template_replace_values : {
	   username : "Aeonor",
	   staffid : "test"
        }
    });
});